<?php
  header('Access-Control-Allow-Origin:*');

  if (!empty($_FILES)) {
    $path = ".\\upload_file\\";

    is_dir($path) || mkdir($path);

    move_uploaded_file($_FILES["upload_file"]["tmp_name"], $path.$_FILES["upload_file"]["name"]);

    echo "上传成功";
  } else {
    echo "上传失败";
  }